package p1.demo02;

public class UserserviceProxy implements UserService {

    private  UserserviceImp userserviceImp;

    public void setUserserviceImp(UserserviceImp userserviceImp) {
        this.userserviceImp = userserviceImp;
    }

    @Override
    public void add() {
        info("add");
      userserviceImp.add();
    }

    @Override
    public void delete() {
        info("delete");
        userserviceImp.delete();
    }

    @Override
    public void update() {
        info("update");
        userserviceImp.update();
    }

    @Override
    public void query() {
        info("query");
        userserviceImp.query();
    }

    //提示方法
    public void info(String msg){
        System.out.println("使用了"+msg+"方法");
    }
}
